﻿#region License
/* ---------------------------------------------------------------- *
 *
 * This file is part of the Xcoordination Application Space
 * ("XcoAppSpace") http://www.xcoordination.com
 *
 * Copyright (C) 2009 Xcoordination http://www.xcoordination.com
 *
 * XcoAppSpace is free software; you can redistribute it and/or
 * modify it under the terms of version 2 of the GNU General
 * Public License as published by the Free Software Foundation.
 *
 * XcoAppSpace is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see http://www.gnu.org/licenses/
 * or write to the Free Software Foundation, Inc., 51 Franklin
 * Street, Fifth Floor, Boston, MA 02110-1301, USA.
 *
 * ---------------------------------------------------------------- */
#endregion

using System;

namespace XcoAppSpaces.Contracts.WorkerResolve
{
	/// <summary>
	/// Status enum for responding to a resolve request.
	/// </summary>
	public enum ResolveStatus : byte
	{
		/// <summary>
		/// The worker resolve was successful.
		/// </summary>
		Ok = 0,

		/// <summary>
		/// The worker with the given name, type and address could not be found.
		/// </summary>
		WorkerNotFound = 1,

		/// <summary>
		/// The user could not be authenticated (missing credentials or wrong username/password).
		/// </summary>
		NotAuthenticated = 2,

		/// <summary>
		/// The user doesn't have permission to access the worker.
		/// </summary>
		NotAuthorized = 3,

        /// <summary>
		/// There was an error during communication (e.g. the space is not running or cannot not be reached for some other reason).
		/// (This state is only for local usage where the request was sent.)
		/// </summary>
		CommunicationError = 4,

		/// <summary>
		/// There was no response to the resolve request (the other space did not answer).
		/// (This state is only for local usage where the request was sent.)
		/// </summary>
		NoResponse = 5
	}
}